import React, {
    AsyncStorage
} from 'react-native';

class Storage {
    static get(key,callback) {
        return AsyncStorage.getItem(key).then((value) => {
            console.log(value);
            callback(value);
        });
    }

    static save(key, value) {
         AsyncStorage.setItem(key, value);
    }

    static update(key, value) {
        return AsyncStorage.setItem(key, value);
    }

    static delete(key) {
        return AsyncStorage.removeItem(key);
    }
}

export default Storage;